]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Use run-eslint.sh wrapper to lint code snippets in docs
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Jun 2025 11:32:08 +0000 (13:32 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 30 Jul 2025 14:27:19 +0000 (14:27 +0000)
This means we only have to deal with a single entry point for
eslint, plus we get the option to produce fancy MR reports.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3746>

.gitlab-ci.yml
.gitlab-ci/eslint-coding-style.sh

index 683b217f19e3aa55f0005a1cfa7fa3d58a0ff26d..728ce998fcdde262dcea086e90363a3edab924d7 100644 (file)
@@ -153,9 +153,14 @@ eslint-doc:
     - .fdo.distribution-image@fedora
     - .gnome-shell.fedora
   stage: review
+  variables:
+    LINT_LOG: "eslint-docs-report.xml"
   script:
-    - export NODE_PATH=$(npm root -g)
-    - ./.gitlab-ci/eslint-coding-style.sh
+    - ./.gitlab-ci/eslint-coding-style.sh --output-file ${LINT_LOG} --format junit --stdout
+  artifacts:
+    reports:
+      junit: ${LINT_LOG}
+    when: always
 
 potfile-c-check:
   extends:
index 39f00530e0afa66d20e8852f6812123b89e41bd9..ce839290f0c4cbbdba53692c0041a59a1f303cd3 100755 (executable)
@@ -37,7 +37,5 @@ input_file, output_dir = sys.argv[1:]
 extract_js_snippets(input_file, output_dir)
 EOF
 
-eslint \
-  --rule 'no-undef: off' \
-  --rule 'no-unused-vars: off' \
-  --rule 'no-invalid-this: off' $OUTDIR/*.js
+echo Checking coding style of coding style docs
+tools/run-eslint.sh "$@" $OUTDIR